package io.datajek.spring.basics.movierecommendersystem.lesson8;

import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 *
 * @author : 浩东
 * @version : 1.6
 * @Project : movie-recommender-system
 * @Package : io.datajek.spring.basics.movierecommendersystem.lesson2
 * @ClassName : CollaborativeFilter.java
 * @createTime : 2021/9/17 17:19
 * @Description :
 *  该方法基于协作过滤器的逻辑，为 "Finding Dory"推荐了一个电影列表
 */

@Component
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class CollaborativeFilter implements Filter {

    public CollaborativeFilter() {
        super();
    }

    public String[] getRecommendations(String movie){

        //实现协作式过滤器的逻辑

        //返回电影推荐
        return new String[]{"Finding Nemo", "Ice Age ", "Toy Story"};
    }
}
